package Class01;

public class Main {
    public static void main(String[] args) {
        System.out.println("该三角形面积为:"+TriangleArea(3,4,5)+",周长为:"+TrianglePermeter(3,4,5));
        System.out.println("该圆形面积为:"+CircleArea(3.5)+",周长为:"+CirclePermeter(3.5));
        System.out.println("该矩形面积为:"+RectangleArea(3,4)+",周长为:"+RectanglePermeter(3,4));
    }

    public static double TriangleArea(double a, double b, double c) {
        return 0.25*Math.sqrt((a+b+c)*(a+b-c)*(a+c-b)*(b+c-a));
    }
    public static double TrianglePermeter(double a,double b,double c){
        return a+b+c;
    }
    public static double CircleArea(double r){
        return Math.PI*r*r;
    }
    public static double CirclePermeter(double r){
        return Math.PI*r*2;
    }
    public static double RectangleArea(double Length,double Weith){
        return Length*Weith;
    }
    public static double RectanglePermeter(double Length,double Weith){
        return 2*(Length+Weith);
    }

}
